CodeSandBox 載入 FontAwesome


Posted by mijouhsieh on 2023-06-10

  • CodeSandBox import Dependencies(即 套件)
  • Font Awesome: icon 頁面選擇 React / Indivisual Import

CodeSandBox import Dependencies

沒有特別選版本號
@fortawesome/react-fontawesome 0.20
@fortawesome/fontawesome-svg-core 6.4.0
@fortawesome/free-solid-svg-icons 6.4.0


CodeSandBox file 頂層 import 元件名稱 和 icon 名稱

import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
  faCircleArrowLeft,
  faCircleArrowRight
} from "@fortawesome/free-solid-svg-icons";

FontAwesomeIcon - Font Awesome 的 React 元件名稱
faCircleArrowLeft, faCircleArrowRight - Font Awesome 的 React icon 名稱


React icon 元件

React icon 元件加屬性

SandCodeBox Practice Link


#FontAwesome #React icon #add dependencies







Related Posts

[ Nuxt.js 2.x 系列文章 ] Lifecycle 生命週期

[ Nuxt.js 2.x 系列文章 ] Lifecycle 生命週期

Advanced JS (中)

Advanced JS (中)

git clone 了一個 Laravel 專案,然後咧?

git clone 了一個 Laravel 專案,然後咧?


Comments